// #include<bits/stdc++.h>
#include "stdio.h"
#include "stdlib.h"
#include "stdint.h"
// using namespace std;


#define N 20010
struct node {
    long long id,num,c; //每个居民的身份序号和，拿补贴数量输出的序号 
} a[N];
uint8_t cmpid(struct node a,struct node b){
    return a.id<b.id;
}

uint8_t cmpnum(struct node a,struct node b){
    return a.num<b.num;
}



void sort(struct node a[N],long len,uint8_t(*cmp_func)(struct node ,struct node ));


int main(){
    long long n,k;
    // cin>>n>>k;
    scanf("%ld %ld",&n,&k);
    long long tem = k/n; //
    for(int i=0;i<n;i++){
        //  cin>>a[i].id;
        scanf(" %ld",&(a[i].id));
         a[i].num = i;
         a[i].c = k/n;
    }
    sort(a,n,cmpid);
    for(int i=0;i<k%n;i++)
        a[i].c+=1;
    sort(a,n,cmpnum);
    for(int i=0;i<n;i++)
        printf("%ld\n",a[i].c); 
}

void sort(struct node a[N],long len,uint8_t(*cmp_func)(struct node ,struct node ))
{
    struct node T;
    int i = 0;
    int m = len-1;//冒泡的上限
    int not_order_flag = 1;//走一趟发现不需要交换，即没有排序完成的flag
    while (m>0 && not_order_flag == 1 ){
        not_order_flag = 0;//默认排序完成
        for(i=0;i<m;i++){
            // if(abs(a[i])>abs(a[i+1])){
            if(cmp_func(a[i+1],a[i])){
                not_order_flag = 1; //需要交换说明还没有排序完成
                // printf("a[i] = %d,a[i+1]=%d",a[i],a[i+1]);
                T = a[i];
                a[i] = a[i+1];
                a[i+1] = T;
            }
        }
        m--;
    }
}
